package com.ruoyi.project.cms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.cms.mapper.BieStudentPostMapper;
import com.ruoyi.project.cms.domain.BieStudentPost;
import com.ruoyi.project.cms.service.IBieStudentPostService;

/**
 * 学生-企业关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-18
 */
@Service
public class BieStudentPostServiceImpl implements IBieStudentPostService 
{
    @Autowired
    private BieStudentPostMapper bieStudentPostMapper;

    /**
     * 查询学生-企业关联
     * 
     * @param id 学生-企业关联主键
     * @return 学生-企业关联
     */
    @Override
    public BieStudentPost selectBieStudentPostById(Long id)
    {
        return bieStudentPostMapper.selectBieStudentPostById(id);
    }

    /**
     * 查询学生-企业关联列表
     * 
     * @param bieStudentPost 学生-企业关联
     * @return 学生-企业关联
     */
    @Override
    public List<BieStudentPost> selectBieStudentPostList(BieStudentPost bieStudentPost)
    {
        return bieStudentPostMapper.selectBieStudentPostList(bieStudentPost);
    }

    /**
     * 新增学生-企业关联
     * 
     * @param bieStudentPost 学生-企业关联
     * @return 结果
     */
    @Override
    public int insertBieStudentPost(BieStudentPost bieStudentPost)
    {
        bieStudentPost.setCreateTime(DateUtils.getNowDate());
        return bieStudentPostMapper.insertBieStudentPost(bieStudentPost);
    }

    /**
     * 修改学生-企业关联
     * 
     * @param bieStudentPost 学生-企业关联
     * @return 结果
     */
    @Override
    public int updateBieStudentPost(BieStudentPost bieStudentPost)
    {
        return bieStudentPostMapper.updateBieStudentPost(bieStudentPost);
    }

    /**
     * 批量删除学生-企业关联
     * 
     * @param ids 需要删除的学生-企业关联主键
     * @return 结果
     */
    @Override
    public int deleteBieStudentPostByIds(Long[] ids)
    {
        return bieStudentPostMapper.deleteBieStudentPostByIds(ids);
    }

    /**
     * 删除学生-企业关联信息
     * 
     * @param id 学生-企业关联主键
     * @return 结果
     */
    @Override
    public int deleteBieStudentPostById(Long id)
    {
        return bieStudentPostMapper.deleteBieStudentPostById(id);
    }
}
